home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1988 January
/
64er_Magazin_88-01_1988_Markt__Technik_de_Side_B.d64
/
load sprite.src
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
108 lines
100 point = $00fa
110 seqpoint = $00fc
120 loadflag = $000a
130 block = $0002
140 errorout = $a437
150 loadfile = $ffd5
160 error = $e1d1
170 status = $ffb7
180 morechar = $e206
190 setname = $ffbd
200 setparam = $ffba
210 getbyte = $e200
220 chkcom = $aefd
230 getstrng = $e257
240 *=$c350
250 lda #$a0
260 sta point+1
270 lda #$90
280 sta seqpoint+1
290 lda #0
300 sta point
310 sta seqpoint
320 sta loadflag
330 sta block
340 jsr getparam
350 loadloop *=*
360 lda loadflag
370 ldx point
380 ldy point+1
390 cpy #$c0
400 bcc notoomem
410 outofmem *=*
420 ldx #$10
430 jmp errorout
440 notoomem *=*
450 jsr loadfile
460 bcc noerr
470 jmp error
480 noerr *=*
490 jsr status
500 and #$bf
510 beq notlderr
520 ldx #$1d
530 jmp errorout
540 notlderr *=*
550 lda point+1
560 clc
570 adc #4
580 sta point+1
590 sei
600 lda #$36
610 sta 1
620 ldy #$4f
630 lda (point),y
640 pha
650 tay
660 clc
670 adc seqpoint
680 lda seqpoint+1
690 adc #0
700 cmp #$a0
710 bcs outofmem
720 lda #$ff
730 sta (seqpoint),y
740 dey
750 bmi endcopy
760 seqcopy *=*
770 lda (point),y
780 and #$f
790 ora block
800 sta (seqpoint),y
810 dey
820 bpl seqcopy
830 endcopy *=*
840 lda #$37
850 sta 1
860 cli
870 lda block
880 clc
890 adc #$10
900 sta block
910 pla
920 clc
930 adc seqpoint
940 sta seqpoint
950 bcc ninseqp
960 inc seqpoint+1
970 ninseqp *=*
980 jsr morechar
990 jsr getname
1000 ldy #0
1010 sty $b9
1020 beq loadloop
1030 getparam *=*
1040 lda #0
1050 jsr setname
1060 ldx #1
1070 tay
1080 jsr setparam
1090 jsr morechar
1100 jsr getbyte
1110 ldy #0
1120 jsr setparam
1130 jsr morechar
1140 getname *=*
1150 jsr chkcom
1160 jmp getstrng